<template>
    <!-- 附件 -->
    <el-dialog title="附件列表" :visible.sync="show" width="700px" :before-close="close">
        <div class="table">
            <el-table :header-cell-style="{background:'#FAFBFC',color:'#828A9D',textAlign:'center'}"
                :cell-style="{textAlign:'center',color:'#1B2431',borderColor:'rgba(0,0,0,0)'}" :data="fileList"
                style="width: 100%">
                <el-table-column prop="id" label="附件编号" show-overflow-tooltip>
                </el-table-column>
                <el-table-column prop="title" label="附件名称" show-overflow-tooltip>
                </el-table-column>
                <el-table-column prop="" label="操作">
                    <template slot-scope="scope">
                        <p style="margin: 0;color: rgb(59, 117, 255);cursor: pointer;" @click="loockFile(scope.row)">查看
                        </p>
                        <!-- <el-popconfirm title="确定删除这个合同附件吗？" @onConfirm="DeleteFile({index:scope.$index, item:scope.row})">
                            <p slot="reference" style="margin: 0;color: #F56C6C;cursor: pointer;">删除</p>
                        </el-popconfirm> -->
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </el-dialog>
</template>
<script>
    export default {
        name: 'showFile',
        props: {
            show: {
                type: Boolean,
                default: () => {
                    return false
                }
            },
            fileList:{
                type:Array,
                default:()=>{
                    return []
                }
            }
        },
        data() {
            return {

            }
        },
        mounted() {

        },
        methods: {
            loockFile(e){
                window.open(e.url);
            },
            close(){
                this.$emit('close',{})
            },
        }
    }
</script>
<style lang="scss" scoped>
    .table{
        max-height: 400px;
        overflow-y: auto;
}
</style>